<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>

<%
    String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>

    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/popup.js"></script>

    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/base.css"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css" rel="stylesheet" type="text/css"/>

    <link href="${pageContext.request.contextPath}/static/css/iconfont.css" rel="stylesheet" type="text/css"/>
    <script language="javascript">
        function c() {
            if (document.formAdd.departmentId.value == "") {
                alert("请选择所在科室");
                return false;
            }
            if (document.formAdd.name.value == "") {
                alert("请输入姓名");
                return false;
            }

            document.formAdd.submit();
        }

        function up() {
            var pop = new Popup({contentType: 1, isReloadOnClose: false, width: 400, height: 200});
            pop.setContent("contentUrl", "${pageContext.request.contextPath}/upload/upload.jsp");
            pop.setContent("title", "文件上传");
            pop.build();
            pop.show();
        }


    </script>
</head>

<form action="${pageContext.request.contextPath}/admin/addExpert.html" name="formAdd" method="post">
    <table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#D1DDAA" align="center"
           style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
            <td height="14" colspan="10" style="height: 30px;">
                &nbsp;&nbsp; <i class="iconfont icon-jia1 font16"></i>添加医生
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                医院：
                </select>
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <select name="hospitalId" id="hospitalId" style="width: 235px;" class="select">
                    <c:forEach items="${hospitalList}" var="hospital">
                        <option value="${hospital.id}">${hospital.name}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                科室：

            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <select name="departmentId" id="departmentId" style="width: 235px;" class="select">
                    <c:forEach items="${departmentList}" var="department">
                        <option value="${department.id}">${department.name}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                姓名：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="name" style="width: 235px;"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                性别：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="radio" name="sex" value="男" checked="checked" style="border: 0px;"/>男
                &nbsp;&nbsp;&nbsp;&nbsp;
                <input type="radio" name="sex" value="女" style="border: 0px;"/>女
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                年龄：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="age" style="width: 235px;" value="40"
                       onkeyup="value=value.replace(/[^\d]/g,'') "
                       onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                擅长：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="skilled" style="width: 500px;height: 100px;"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                类型：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <select name="type" id="type" style="width: 235px;" class="select">
                    <option value="专家门诊">专家门诊</option>
                    <option value="普通门诊">普通门诊</option>
                </select>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                照片：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="file" id="file" readonly="readonly" style="width: 235px;"/>
                <input type="button" value="上传" onclick="up()"
                       style="width: 60px;height: 25px;box-sizing: border-box; border-radius: 5px;"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                账号：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="userName" style="width: 235px;"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                密码：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="text" name="password" style="width: 235px;"/>
            </td>
        </tr>
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td width="25%" bgcolor="#FFFFFF" align="right">
                &nbsp;
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="button" value="提交" onclick="c()"
                       style="width: 80px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;"/>&nbsp;
                <input type="reset" value="重置"
                       style="width: 80px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;"/>&nbsp;
            </td>
        </tr>

    </table>
</form>
</body>
</html>
